package tmt.usercenter.web.controller.admin;


import com.tmt.datatable.editor.EditorModel;
import com.tmt.datatable.editor.EditorValid;
import com.tmt.datatable.ext.controller.DataTableController;
import com.tmt.datatable.ext.controller.TablePage;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import tmt.usercenter.web.common.Const;
import tmt.usercenter.web.controller.validtor.UserRegisterValidator;
import tmt.usercenter.web.domain.TmtUser;
import tmt.usercenter.web.domain.TmtUserRole;
import tmt.usercenter.web.service.TmtUserRoleService;
import tmt.usercenter.web.service.TmtUserService;

import javax.validation.Valid;
import java.util.concurrent.ExecutionException;

@Getter
@Setter
@Controller
@RequestMapping(Const.ADMIN_PATH + "/user")
@TablePage(Const.ADMIN_PATH + "/user/user-index")
public class AdminUserController extends DataTableController<TmtUser, Long> {

    @Autowired
    private TmtUserService tmtUserService;

    @Override
    public EditorModel<TmtUser> doTableAction(@Valid @EditorValid("User") EditorModel<TmtUser> editor)
            throws ExecutionException, InterruptedException{
        return super.doTableAction(editor);
    }
}
